﻿using System;
using System.Text.RegularExpressions;

namespace EmailValidator
{
    public class Program
    {
        public static void Main()
        {
            string pattern = @"\b[A-Za-z0-9\._-]+@[A-Za-z0-9\._-]+\.[A-Za-z0-9]{2,4}\b";
            string text = @"Test@testzor.test. Myemail@gmail.crap. New@emailclient.org";
            Match match = Regex.Match(text, pattern);
            while (match.Success)
            {
                Console.WriteLine(match.Value);
                match = match.NextMatch();
            }
        }
    }
}
